/**
 * 2017年6月29日
 */
package org.textplantform.common.core.mq;

import java.util.concurrent.Future;

import org.apache.kafka.clients.producer.Callback;
import org.apache.kafka.clients.producer.Producer;
import org.apache.kafka.clients.producer.ProducerRecord;
import org.apache.kafka.clients.producer.RecordMetadata;
import org.textplantform.common.api.mq.PlantformTextProducer;

/**
 * 注意没有public 代表是包权限的.外面的无法访问
 * @author Alex
 *
 */
public abstract class DefaultTextProducer implements PlantformTextProducer<ProducerRecord<String, String>,Future<RecordMetadata>,Callback,Producer<String, String>>{
	Producer<String, String> delegate;
	DefaultTextProducer(Producer<String, String> p){
		this.delegate = p;
	}
	@Override
	public Future<RecordMetadata> send(ProducerRecord<String, String> message) {
		return delegate.send(message);
	}
	@Override
	public Future<RecordMetadata> send(ProducerRecord<String, String> message, Callback c) {
		return delegate.send(message, c);
	}
	@Override
	public Producer<String, String> getDelegate() {
		return delegate;
	}
	@Override
	public void close() {
		delegate.close();
	}
	


}
